#include "MyApp.h"

namespace PeanutQuest {

	MyApp::MyApp() : cg::Application("config.ini") {
		_windowInfo.caption = "Peanut Quest";
		_windowInfo.width = cg::Properties::instance()->getInt("WIN_WIDTH");
		_windowInfo.height = cg::Properties::instance()->getInt("WIN_HEIGHT");
	}

	MyApp::~MyApp() {
	}

	void MyApp::createEntities() {
		addEntity(new GameManager());
		addEntity(new CameraManager());
		addEntity(new ShooterManager("ShooterManager"));
		addEntity(new MyController());
		addEntity(new ConfigManager("ConfigManager"));
	}

	void MyApp::createViews() {
		cg::View* v = createView("view");
		v->linkEntityAtEnd("ConfigManager");
		v->linkEntityAtEnd("GameManager");
		v->linkEntityAtEnd("ShooterManager");
		v->linkEntityAtEnd("CameraManager");
		v->linkEntityAtEnd("Controller");
	}
}